#读取yaml格式的测试数据，封装成List[Dict]

import yaml

#带测试用例编号key一起读取！
#参数file_name:*.yaml文件的路径
#参数key：*.yaml文件中你要读取的这些测试用例的Key
def read_cesiData(file_name, key):
    with open("data/"+file_name, "r") as f:
        data = yaml.load(f,Loader=yaml.FullLoader)[key]
        ret = list()
        for k in data.keys():
            v=data[k];
            v["key"]=k;
            ret.append(v);
        return ret
